﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>修改管理员密码</title>
    <script src="/Scripts/common/common.js" type="text/javascript"></script>
    <script src="/Scripts/site/bgmgr/webadmin/changepsw.js" type="text/javascript"></script>
</head>
<body>
    <ext:ResourceManager runat="server" />
    <ext:Viewport runat="server" Layout="fit">
        <Items>
            <ext:FormPanel ID="ChangePswForm" runat="server" IDMode="Explicit" Border="false" Padding="3"
                Url="/BgMgr/WebAdmin/ChangePsw">
                <TopBar>
                    <ext:Toolbar runat="server">
                        <Items>
                            <ext:Button IDMode="Explicit" runat="server" Text="保存" Icon="Disk">
                                <Listeners>
                                    <Click Handler="if (#{ChangePswForm}.form.isValid()) {#{ChangePswForm}.form.submit({waitMsg:'保存中...', success: successHandler, failure: failureHandler});} else {Ext.Msg.show({title:'错误', icon: Ext.MessageBox.ERROR, msg: '请检查表单是否填写正确。', buttons:Ext.Msg.OK});}" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:TextField ID="NewPsw" runat="server" FieldLabel="新密码" AnchorHorizontal="50%" InputType="Password" 
                        MinLength="5" MaxLength="15" AllowBlank="false" />
                    <ext:TextField ID="CheckPsw" runat="server" FieldLabel="确认密码" AnchorHorizontal="50%" InputType="Password" 
                        MinLength="5" MaxLength="15" AllowBlank="false" Vtype="password" MsgTarget="Side" VtypeText="密码不一致">
                        <CustomConfig>
                            <ext:ConfigItem Name="initialPassField" Value="#{NewPsw}" Mode="Value" />
                        </CustomConfig>    
                    </ext:TextField>
                </Items>
            </ext:FormPanel>
        </Items>
    </ext:Viewport>
</body>
</html>
